package GUI;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;







public class MainMenu extends JFrame {

	/**
	 * @param args
	 */
	public static void main(String[] args){
		
		JFrame x= new MainMenu();
		x.setVisible(true);
		
	}
	
	public MainMenu()
	{
		//***imposta il look & feel, lo stle a seconda del sistema operativo***
        try
        {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        }
        catch (Exception e)
        {
            JOptionPane.showMessageDialog(null,"Impossibile impostare lo stile: " + e);
        }
		panel=new JPanel();
		label= new JLabel();
		button=new JButton("Storia");
		button.setBounds(355,250,100,40);
		button.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent arg0)
			{
				JFrame storia= new Storia();
				storia.setVisible(true);
				dispose();
			}
		});
		button1=new JButton("VS");
		button1.setBounds(370,300,70,40);
		button2=new JButton("Record");
		button2.setBounds(355,350,100,40);
		button3=new JButton("Extra");
		button3.setBounds(360,400,90,40);
		button3.addActionListener(new ActionListener()
		{
			public void actionPerformed(ActionEvent arg0)
			{
				JFrame extra= new Extra();
				extra.setVisible(true);
				dispose();
			}
		});
		button4=new JButton("Opzioni");
		button4.setBounds(355,450,100,40);
		setTitle("Day Dreaming");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setResizable(false);
		setBounds(100,100,800,600);
		panel.setBorder(new EmptyBorder(0,0,0,0));
		setContentPane(panel);
		label.setBounds(0,0,0,0);
		label.setIcon(new ImageIcon("Immagini//Menu Iniziale//Sfondo1.jpg"));
		panel.add(label);
		label.add(button);
		label.add(button1);
		label.add(button2);
		label.add(button3);
		label.add(button4);
		}
	

	
	private JButton button;
	private JButton button1;
	private JButton button2;
	private JButton button3;
	private JButton button4;
	private JLabel label;
	private JPanel panel;

}